package com.ruoyi.system.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SystemDivineMapper;
import com.ruoyi.system.domain.SystemDivine;
import com.ruoyi.system.service.ISystemDivineService;

/**
 * 系统占卜配置Service业务层处理
 * 
 * @author DEREK
 * @date 2023-08-02
 */
@Service
public class SystemDivineServiceImpl extends ServiceImpl<SystemDivineMapper, SystemDivine> implements ISystemDivineService 
{
    @Autowired
    private SystemDivineMapper systemDivineMapper;

    /**
     * 查询系统占卜配置
     * 
     * @param id 系统占卜配置主键
     * @return 系统占卜配置
     */
    @Override
    public SystemDivine selectSystemDivineById(Long id)
    {
        return systemDivineMapper.selectSystemDivineById(id);
    }

    /**
     * 查询系统占卜配置列表
     * 
     * @param systemDivine 系统占卜配置
     * @return 系统占卜配置
     */
    @Override
    public List<SystemDivine> selectSystemDivineList(SystemDivine systemDivine)
    {
        return systemDivineMapper.selectSystemDivineList(systemDivine);
    }

    /**
     * 新增系统占卜配置
     * 
     * @param systemDivine 系统占卜配置
     * @return 结果
     */
    @Override
    public int insertSystemDivine(SystemDivine systemDivine)
    {
        systemDivine.setCreateTime(DateUtils.getNowDate());
        return systemDivineMapper.insertSystemDivine(systemDivine);
    }

    /**
     * 修改系统占卜配置
     * 
     * @param systemDivine 系统占卜配置
     * @return 结果
     */
    @Override
    public int updateSystemDivine(SystemDivine systemDivine)
    {
        return systemDivineMapper.updateSystemDivine(systemDivine);
    }

    /**
     * 批量删除系统占卜配置
     * 
     * @param ids 需要删除的系统占卜配置主键
     * @return 结果
     */
    @Override
    public int deleteSystemDivineByIds(Long[] ids)
    {
        return systemDivineMapper.deleteSystemDivineByIds(ids);
    }

    /**
     * 删除系统占卜配置信息
     * 
     * @param id 系统占卜配置主键
     * @return 结果
     */
    @Override
    public int deleteSystemDivineById(Long id)
    {
        return systemDivineMapper.deleteSystemDivineById(id);
    }
}
